
<c:choose>
<c:when test='<%= tabs2.equals("New") %>'>

<%
List<CollOthers> collOtherssNew = CollOthersLocalServiceUtil.getByStatus(0);

SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, tabs2URL, null, "");
List newResults = ListUtil.subList(collOtherssNew, searchContainer.getStart(), searchContainer.getEnd());
int total = collOtherssNew.size();
searchContainer.setTotal(total);

%>
<center>
<table class="taglib-search-iterator" style="width:100%" cellspacing="0" cellpadding="2">
	<tr class='results-header'>
		<th><liferay-ui:message key="sNo" /></th>
		<th><liferay-ui:message key="first-name" /></th>	
		<th><liferay-ui:message key="middle-name" /></th>
		<th><liferay-ui:message key="last-name" /></th>
		<th></th>
	</tr>
<%
for(int i=0; i<newResults.size(); i++){

		CollOthers collOthers = (CollOthers) newResults.get(i);
		String className = ( ( i%2 == 0 ) ? "portlet-section-body results-row" : "portlet-section-body results-row alt"); 
		String classNameHover = className+" hover";%>
		<tr class='<%= className %>'; onmouseout="this.className = '<%=className%>'" onmouseover="this.className = '<%=classNameHover%>'"> 
			
			<td><%= Integer.toString(searchContainer.getStart() + i + 1)%></td>
			<td><%= collOthers.getFirstName() %></td>
			<td><%= collOthers.getMiddleName() %></td>
			<td><%= collOthers.getLastName() %></td>
			<td>
			<liferay-ui:icon-menu>
				<portlet:actionURL windowState="<%= WindowState.NORMAL.toString() %>" var="viewCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="viewCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="preview" message="View" url="<%= viewCollOthers %>" />
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="approveCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="approveCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="add_user" message="Approve" url="<%= approveCollOthers %>" />
			</liferay-ui:icon-menu>
			</td>
		
		</tr>
		
<%	
}
%>
</table>
</center>
<div class="taglib-search-iterator-page-iterator-bottom">
	<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
</div>
</c:when>


<c:when test='<%= tabs2.equals("Approved") %>'>

<%
List<CollOthers> collOtherssApproved = CollOthersLocalServiceUtil.getByStatus(1);


SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, tabs2URL, null, "");
List approvedResults = ListUtil.subList(collOtherssApproved, searchContainer.getStart(), searchContainer.getEnd());
int total = collOtherssApproved.size();
searchContainer.setTotal(total);

%>

<center>
<table class="taglib-search-iterator" style="width:100%" cellspacing="0" cellpadding="2">
	<tr class='results-header'>
		<th><liferay-ui:message key="sNo" /></th>
		<th><liferay-ui:message key="first-name" /></th>	
		<th><liferay-ui:message key="middle-name" /></th>
		<th><liferay-ui:message key="last-name" /></th>
		<th></th>
	</tr>
<%
for(int i=0; i<approvedResults.size(); i++){

		CollOthers collOthers = (CollOthers) approvedResults.get(i);
		String className = ( ( i%2 == 0 ) ? "portlet-section-body results-row" : "portlet-section-body results-row alt"); 
		String classNameHover = className+" hover";%>
		<tr class='<%= className %>'; onmouseout="this.className = '<%=className%>'" onmouseover="this.className = '<%=classNameHover%>'"> 
			
			<td><%= Integer.toString(searchContainer.getStart() + i + 1)%></td>
			<td><%= collOthers.getFirstName() %></td>
			<td><%= collOthers.getMiddleName() %></td>
			<td><%= collOthers.getLastName() %></td>
			<td>
			<liferay-ui:icon-menu>
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="viewCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="viewCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="preview" message="View" url="<%= viewCollOthers %>" />
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="removeCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="removeCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="remove" message="Approve" url="<%= removeCollOthers %>" />
			</liferay-ui:icon-menu>
			</td>
		
		</tr>
		
<%	
}
%>
</table>
</center>
<div class="taglib-search-iterator-page-iterator-bottom">
	<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
</div>
</c:when>


<c:when test='<%= tabs2.equals("Pending") %>'>

<%
List<CollOthers> collOtherssPending = CollOthersLocalServiceUtil.getByStatus(2);


SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, tabs2URL, null, "");
List pendingResults = ListUtil.subList(collOtherssPending, searchContainer.getStart(), searchContainer.getEnd());
int total = collOtherssPending.size();
searchContainer.setTotal(total);

%>

<center>
<table class="taglib-search-iterator" style="width:100%" cellspacing="0" cellpadding="2">
	<tr class='results-header'>
		<th><liferay-ui:message key="sNo" /></th>
		<th><liferay-ui:message key="first-name" /></th>	
		<th><liferay-ui:message key="middle-name" /></th>
		<th><liferay-ui:message key="last-name" /></th>
		<th></th>
	</tr>
<%
for(int i=0; i<pendingResults.size(); i++){

		CollOthers collOthers = (CollOthers) pendingResults.get(i);
		String className = ( ( i%2 == 0 ) ? "portlet-section-body results-row" : "portlet-section-body results-row alt"); 
		String classNameHover = className+" hover";%>
		<tr class='<%= className %>'; onmouseout="this.className = '<%=className%>'" onmouseover="this.className = '<%=classNameHover%>'"> 
			
			<td><%= Integer.toString(searchContainer.getStart() + i + 1)%></td>
			<td><%= collOthers.getFirstName() %></td>
			<td><%= collOthers.getMiddleName() %></td>
			<td><%= collOthers.getLastName() %></td>
			<td>
			<liferay-ui:icon-menu>
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="viewCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="viewCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="preview" message="View" url="<%= viewCollOthers %>" />
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="approveCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="approveCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="add_user" message="Approve" url="<%= approveCollOthers %>" />
			</liferay-ui:icon-menu>
			</td>
		
		</tr>
		
<%	
}
%>
</table>
</center>
<div class="taglib-search-iterator-page-iterator-bottom">
	<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
</div>
</c:when>


<c:when test='<%= tabs2.equals("Rejected") %>'>

<%
List<CollOthers> collOtherssRejected = CollOthersLocalServiceUtil.getByStatus(3);


SearchContainer searchContainer = new SearchContainer(renderRequest, null, null, SearchContainer.DEFAULT_CUR_PARAM, 5, tabs2URL, null, "");
List rejectedResults = ListUtil.subList(collOtherssRejected, searchContainer.getStart(), searchContainer.getEnd());
int total = collOtherssRejected.size();
searchContainer.setTotal(total);
%>

<center>
<table class="taglib-search-iterator" style="width:100%" cellspacing="0" cellpadding="2">
	<tr class='results-header'>
		<th><liferay-ui:message key="sNo" /></th>
		<th><liferay-ui:message key="first-name" /></th>	
		<th><liferay-ui:message key="middle-name" /></th>
		<th><liferay-ui:message key="last-name" /></th>
		<th></th>
	</tr>
<%
for(int i=0; i<rejectedResults.size(); i++){

		CollOthers collOthers = (CollOthers) rejectedResults.get(i);
		String className = ( ( i%2 == 0 ) ? "portlet-section-body results-row" : "portlet-section-body results-row alt"); 
		String classNameHover = className+" hover";%>
		<tr class='<%= className %>'; onmouseout="this.className = '<%=className%>'" onmouseover="this.className = '<%=classNameHover%>'"> 
			
			<td><%= Integer.toString(searchContainer.getStart() + i + 1)%></td>
			<td><%= collOthers.getFirstName() %></td>
			<td><%= collOthers.getMiddleName() %></td>
			<td><%= collOthers.getLastName() %></td>
			<td>
			<liferay-ui:icon-menu>
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="viewCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="viewCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="preview" message="View" url="<%= viewCollOthers %>" />
				<portlet:actionURL windowState="<%= WindowState.MAXIMIZED.toString() %>" var="approveCollOthers">
				<portlet:param name="struts_action" value="/ext/registration/campusRegistration" />
				<portlet:param name="<%= Constants.CMD %>" value="approveCollOthers" />
				<portlet:param name="collOthersId" value="<%= String.valueOf(collOthers.getCollOthersId()) %>" />
				</portlet:actionURL>
				<liferay-ui:icon image="add_user" message="Approve" url="<%= approveCollOthers %>" />
			</liferay-ui:icon-menu>
			</td>
		
		</tr>
		
<%	
}
%>
</table>
</center>
<div class="taglib-search-iterator-page-iterator-bottom">
	<liferay-ui:search-paginator searchContainer="<%= searchContainer %>" />
</div>
</c:when>
</c:choose>